package com.xbts.web.controller.connect;

import com.xbts.common.core.controller.BaseController;
import com.xbts.system.module.connect.entity.dto.AuthCallback;
import com.xbts.system.module.connect.util.ConnectUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author llk
 * @Date 2023/8/16 11:16
 */
@Api("系统设置")
@RestController
@RequestMapping("/system/connect")
public class ConnectWebController extends BaseController {

    @Autowired
    private ConnectUtil connectUtil;

    @ApiOperation(value = "信任登录统一回调地址", hidden = true)
    @GetMapping("/callback")
    public void callBack(AuthCallback callback, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
        connectUtil.callback(callback, httpServletRequest, httpServletResponse);
    }
}
